﻿namespace Borg
{
    public class ExtensionTypePropertyInfo
    {
        private readonly ExtensionTypeInfo _extensionType;

        public ExtensionTypePropertyInfo(ExtensionTypeInfo extensionType)
        {
            _extensionType = extensionType;
        }

        public bool AutoRelease
        {
            get { return _extensionType.extensionAttr.AutoRelease; }
            set
            {
                if (AutoRelease == value)
                    return;

                _extensionType.extensionAttr.AutoRelease = value;
                _extensionType.OnPropertyChanged("AutoRelease");
            }
        }

        public bool Singleton
        {
            get { return _extensionType.extensionAttr.Singleton; }
            internal set
            {
                if (Singleton == value)
                    return;

                _extensionType.extensionAttr.Singleton = value;
                _extensionType.OnPropertyChanged("Singleton");
            }
        }
    }
}

